package org.createModel.factory.before;

public class CoffeeStore {
    public Coffee orderCoffee(String type) {
        Coffee coffee = null;
        if ("AmericanCoffee".equals(type)) {
            coffee = new AmericanCoffee();
        } else if ("LatteCoffee".equals(type)) {
            coffee = new LatteCoffee();
        } else {
            return coffee;
        }
        coffee.addMilk();
        coffee.addSugar();
        return coffee;
    }
}
